This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
Propagte security context to threads created by spring #406
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
All flow and task execution are async (@async) and All
of them are lacking the security context. This means sending
notification or any other action that needs this info is lacking it.
Modification
Configure the context strategy on bootup time so every thread that
spring creates will inherit the security context.
Result
Sending notifications using the Notifier interface doesn't need any user
information
Gaps
Workflows that are continued upon server restart are probably missing
this information and we need to probably fetch the user info from the DB
and rebuild the security context.
Signed-off-by: Roy Golan rgolan@redhat.com